package com.ddd.mill.infrastructure.annotation;


import com.ddd.mill.infrastructure.advice.EnumPatternDateAdvice;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author liu
 * @title: EnumRangePattern
 * @projectName user-enterprise-center
 * @date 2020/11/2314:08
 */
@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER })
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {EnumPatternDateAdvice.class})
public @interface EnumPattern {

    String message() default "枚举范围校验错误";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

    Class<?> target() default Class.class;

    boolean ignoreEmpty() default true;
}
